<!DOCTYPE HTML>
<html>
    
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
        <title>
            我的
        </title>
        <link href="http://bao.4i1.cn/ge/css/style.css" type="text/css" rel="stylesheet" />
        
    </head>
    
    <body class="main_background">
        <div class="box padding_bottom02">
            <div class="top_02">
                <img src="http://bao.4i1.cn/ge/picture/top.png" />
            </div>
            <div class="guang">
                <img id="img" src="http://bao.4i1.cn/ge/picture/guang.png" />
            </div>
            <div class="center">
                <div class="c_b background_white">
                    <h3 class="title font_red" style="margin-bottom: 0;">
                        ID : 1850
                    </h3>
                    <h3 class="title font_red">
                        上级代理 : 0
                    </h3>
                    <ul class="personal">
                        <li>
                            <span>
                                推广人数
                            </span>
                            <span class="font_red">
                                0
                            </span>
                        </li>
                        <li>
                            <span>
                                佣金数
                            </span>
                            <span class="font_red">
                                0.00
                            </span>
                        </li>
                        <li>
                            <span>
                                待发佣金
                            </span>
                            <span class="font_red">
                                0.00
                            </span>
                        </li>
                    </ul>
                </div>
                <div class="c_b background_white b_r cb_p">
                    <ul class="personal_box">
                        <li>
                            <span>
                                充值额：
                            </span>
                            <span class="font_red">
                                ￥58.54
                            </span>
                            <a href="#" class="info">
                                充值
                            </a>
                        </li>
                       <li>
                            <span>
                                可提现：
                            </span>
                            <span class="font_red">
                                ￥58.54
                            </span>
                            <a href="#" class="info">
                                提现
                            </a>
                        </li>
                        <!-- <li><span>奖　励：</span><span class="font_red"> ￥0.00</span><a id="withdraw_prize" href="javascript:" style="text-align: center;" class="info bg_orange">全额提现</a></li> -->
                         <li class="no_border">
                            <a href="http://test.srwcpw.cn/index.php/User/Red/contact.html" class="r_aroow">
                                <span class="bg05">
                                    提现二维码管理
                                </span>
                                <a href="contact.do" class="r_aroow">
                                </a>
                        </li>
						<li>
                            <a href="http://test.srwcpw.cn/index.php/User/Daili/detail.html" class="r_aroow">
                                <span class="bg01">
                                    代理详情
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="http://test.srwcpw.cn/index.php/User/Red/jilu.html" class="r_aroow">
                                <span class="bg02">
                                    中奖记录
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="http://test.srwcpw.cn/index.php/User/Red/chonzhijilu.html" class="r_aroow">
                                <span class="bg03">
                                    充值记录
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="http://test.srwcpw.cn/index.php/User/Red/yonjinjilu.html" class="r_aroow">
                                <span class="bg04">
                                    佣金记录
                                </span>
                                <a href="my_commission.do" class="r_aroow">
                                </a>
                        </li>
						
                    </ul>
                </div>
            </div>
        </div>
        <div class="nav nav_background" style="z-index: 99999;">
            <a href="http://test.srwcpw.cn/index.php/User/Red/index.html">
                抢红包
            </a>
            <a href="http://test.srwcpw.cn/index.php/User/Red/ranking.html">
                排行榜
            </a>
            <a href="http://test.srwcpw.cn/index.php/User/Daili/index.html">
                代理
            </a>
            <a href="http://test.srwcpw.cn/index.php/User/Red/mine.html">
                我的
            </a>
            <a href="http://test.srwcpw.cn/index.php/User/Red/contact.html" class="no_border">
                客服
            </a>
        </div>
        <div id="top_up" class="modal" tabindex="-1" role="dialog">
            <h4>
                请输入充值金额：
            </h4>
            <input type="number" id="fee" />
            <a href="javascript:" id="payment" class="top_up_blue d_open">
                确定
            </a>
            <a href="javascript:" class="d_close">
                取消
            </a>
        </div>
        <div id="tip" class="modal" tabindex="-1" role="dialog" style="text-align: center;">
            <div style="padding-left: 5px;padding-right: 5px;padding-bottom: 5px;">
                <h4>
                    信息提示
                </h4>
                <span style="font-size: 15px;" id="text">
                </span>
                <a style="width: 100%;margin-top: 5px;" href="javascript:" id="reload_close">
                    确定
                </a>
            </div>
        </div>
        <script src="js/jquery_1.12.4_jquery.min.js">
        </script>
        <script type="text/javascript" src="js/bootstrap.min.js">
        </script>
        <script type="text/javascript">
            $("#reload_close").on("click",
            function() {
                window.location.reload();
            });
            var angle = 0;
            // setInterval(function () {
            //     angle += 3;
            //     $("#img").rotate(angle);
            // }, 100);
            $(".d_close").on("click",
            function() {
                $('#top_up').modal("hide");
                $("body").off("touchmove");
                $("#fee").val();
            });

            $("#d_open").on("click",
            function() {
                $("body").on("touchmove",
                function(event) {
                    event.preventDefault;
                },
                false);
                $('#top_up').modal({
                    "backdrop": "static"
                });
            });

            $("#payment").on("click",
            function() {
                var fee = $("#fee").val();
                if (fee == null || fee.trim().length == 0) {
                    alert("请输入充值金额");
                    return;
                }
                $(".d_close").trigger("click");
                $.ajax({
                    type: "post",
                    url: "/payment/other.do",
                    data: {
                        "fee": fee,
                        "redirect": window.location.href
                    },
                    dataType: "json",
                    success: function(response) {
                        var param = response.data.payment;
                        WeixinJSBridge.invoke('getBrandWCPayRequest', {
                            "appId": param.bank_wx_app_id,
                            "timeStamp": param.timestamp,
                            "nonceStr": param.nonce_str,
                            "package": "prepay_id=" + param.prepay_id,
                            "signType": "MD5",
                            "paySign": param.pay_sign
                        },
                        function(res) {
                            if (res.err_msg == "get_brand_wcpay_request:ok") {
                                window.location.reload();
                            }
                        });
                    }
                });
            });

            /*$("#withdraw_balance").on("click",function () {
        var t = $(this);
        if(!t.hasClass("bg_orange")){
            $.ajax({
                type: "post",
                url: "/withdraw/balance.do",
                data:{"token":"balance"},
                dataType: "json",
                success: function(response){
                    if(response.status != "0"){
                        $('#tip').find("#text").text(response.message);
                        $('#tip').modal({
                            "backdrop":"static"
                        });
                        return;
                    }
                    $('#tip').find("#text").html("余额提现成功请查看钱包余额核对。");
                    $('#tip').modal({
                        "backdrop":"static"
                    });
                }
            });
        }
    });*/

            $("#withdraw_commission").on("click",
            function() {
                var t = $(this);
                if (!t.hasClass("bg_orange")) {
                    $.ajax({
                        type: "post",
                        url: "/index.php/User/Daili/xpay.html",
                        data: {
                            "token": "commission"
                        },
                        dataType: "json",
                        success: function(response) {
                            if (response.status != "0") {
                                $('#tip').find("#text").text(response.message);
                                $('#tip').modal({
                                    "backdrop": "static"
                                });
                                return;
                            }
                            $('#tip').find("#text").html("佣金提现成功请查看钱包余额核对。");
                            $('#tip').modal({
                                "backdrop": "static"
                            });
                        }
                    });
                }
            });

            $("#withdraw_prize").on("click",
            function() {
                var t = $(this);
                if (!t.hasClass("bg_orange")) {
                    $.ajax({
                        type: "post",
                        url: "/withdraw/prize.do",
                        data: {
                            "token": "prize"
                        },
                        dataType: "json",
                        success: function(response) {
                            if (response.status != "0") {
                                $('#tip').find("#text").text(response.message);
                                $('#tip').modal({
                                    "backdrop": "static"
                                });
                                return;
                            }
                            $('#tip').find("#text").html("奖励提现成功请查看钱包余额核对。");
                            $('#tip').modal({
                                "backdrop": "static"
                            });
                        }
                    });
                }
            });
        </script>
    </body>

</html>